<!--多自由度螺栓强度校核-->
<template>
    <div class="bolt-all">
        <div class="bolt-left">
            <div class="bolt-left-title">螺栓/螺钉和夹紧件参数</div>
            <div class="bolt-left-contend">
                <div class="bolt-left-contend-left">
                    <ul class="bolt-left-contend-left-ul">
                        <li>拧紧力矩(Nmm)</li>
                        <li>拧紧系数</li>
                        <li>夹紧件孔径(mm)</li>
                        <li>夹紧件孔倒角直径(mm)</li>
                        <li>螺矩(mm)</li>
                        <li>螺纹副摩擦系数</li>
                        <li>支承面摩擦系数</li>
                        <li>垫片厚度(mm)</li>
                        <li>螺杆内径(mm)</li>
                        <li>螺杆最小直径(mm)</li>
                        <li>螺杆自由螺纹长度(mm)</li>
                        <li>夹紧件弹性模量(MPa)</li>
                        <li>上部夹紧件厚度(mm)</li>
                        <li>下部夹紧件厚度(mm)</li>
                        <li>夹紧件表面粗糙度Rz(um)</li>
                        <li>支承表面粗糙度Rz(um)</li>
                        <li>螺栓/螺钉热处理类型</li>
                        <li>扭矩应力缩减系数</li>
                        <li>夹紧件许用压应力(MPa)</li>
                        <li>夹紧件类型</li>
                        <li>结合面上替代外径DA'(mm)</li>
                        <li><span v-show="params_bolt.type1==2||params_bolt.type1==3||params_bolt.type1==4">圆环外径（mm）</span></li>
                        <li><span v-show="params_bolt.type1==3||params_bolt.type1==4">圆环内径（mm）</span></li>
                        <li><span v-show="params_bolt.type1==4">螺栓/螺钉间距（mm）</span></li>
                    </ul>
                    <ul class="bolt-left-contend-left-ul-1">
                        <li><input v-model="form.MA_input"></li>
                        <li><input v-model="form.aA"></li>
                        <li><input v-model="form.dh"></li>
                        <li><input v-model="form.dha"></li>
                        <li><input v-model="form.p"></li>
                        <li>
                            <input v-model="form.uG">
                            <span>
                                <button style="background-color: #D7D7D7;width: 20%;height: 98%;border-radius: 2px;margin-left: 5%" @click="showModal10">!</button>
                                <a-modal v-model="visible10" title="接合面摩擦系数" @ok="handleOk10">
                                    <img style="width: 100%;height: 100%" src="../../../assets/image/image_45_06.png">
                                </a-modal>
                            </span>
                        </li>
                        <li><input v-model="form.uK"></li>
                        <li><input v-model="form.hs"></li>
                        <li><input v-model="form.db"></li>
                        <li>
                            <input v-model="form.d0">
                            <span>
                                <button style="background-color: #D7D7D7;width: 20%;height: 98%;border-radius: 2px;margin-left: 5%" @click="showModal11">!</button>
                                <a-modal v-model="visible11" title="几何参数" @ok="handleOk11">
                                    <img style="width: 100%;height: 100%" src="../../../assets/image/image_45_01.png">
                                </a-modal>
                            </span>
                        </li>
                        <li><input v-model="form.l_Gew"></li>
                        <li><input v-model="form.E_p"></li>
                        <li><input v-model="form.h1"></li>
                        <li><input v-model="form.h2"></li>
                        <li><input v-model="form.Rz_inter"></li>
                        <li><input v-model="form.Rz_support"></li>
                        <li>
                            <select v-model="form.heat_treatment_type" style="boder:0.5px solid;border-color: #aaaaaa;border-radius: 0.5px ;width: 50%;height: 98%;margin-top: 1%">
                                <option value="1">热处理前滚压</option>
                                <option value="2">热处理后滚压</option>
                            </select>
                        </li>
                        <li><input v-model="form.reduction_coefficient"></li>
                        <li><input v-model="form.pG"></li>
                        <li>
                            <select v-model="params_bolt.type1" style="boder:0.5px solid;border-color: #aaaaaa;border-radius: 0.5px ;width: 50%;height: 90%;margin-top: 1%">
                                <option value="1">盘形夹紧件</option>
                                <option value="2">圆柱形夹紧件</option>
                                <option value="3">方形夹紧件</option>
                                <option value="4">圆环形夹紧件</option>
                            </select>
                            <span>
                                <button style="background-color: #D7D7D7;width: 20%;height: 98%;border-radius: 2px;margin-left: 5%" @click="showModal12">!</button>
                                <a-modal v-model="visible12" title="夹紧件类型" @ok="handleOk12">
                                    <img style="width: 100%;height: 100%" src="../../../assets/image/image_45_05.png">
                                </a-modal>
                            </span>
                        </li>
                        <li>
                            <input v-model="form.D_A1">
                            <span>
                                <button style="background-color: #D7D7D7;width: 20%;height: 98%;border-radius: 2px;margin-left: 5%" @click="showModal13">!</button>
                                <a-modal v-model="visible13" title="基本实体替代直径DA'2" @ok="handleOk13">
                                    <img style="width: 100%;height: 100%" src="../../../assets/image/image_45_04.png">
                                </a-modal>
                            </span>
                        </li>
                        <li>
                            <span v-show="params_bolt.type1==2"><input v-model="form.D_A"></span>
                            <span v-show="params_bolt.type1==3"><input v-model="form.bT"></span>
                            <span v-show="params_bolt.type1==4"><input v-model="form.doo"></span>
                        </li>
                        <li>
                            <span v-show="params_bolt.type1==3"><input v-model="form.cT"></span>
                            <span v-show="params_bolt.type1==4"><input v-model="form.di"></span>
                        </li>
                        <li>
                            <span v-show="params_bolt.type1==4"><input v-model="form.t"></span>
                        </li>
                    </ul>
                </div>
                <div class="bolt-left-contend-right">
                    <div style="width: 100%;height: 5%;display: flex;">
                        <ul style="width: 19%;height: 100%;text-align: right">
                            <li>连接类型</li>
                        </ul>
                        <ul style="width: 20%;height: 100%;margin-left: 1%">
                            <li style="width: 100%;height: 100%">
                                <select v-model="form.joint_type" style="boder:0.5px solid;border-color: #aaaaaa;border-radius: 0.5px ;width: 90%;height: 90%;margin-top: 1%">
                                    <option value="1">螺栓连接</option>
                                    <option value="2">螺钉连接</option>
                                </select>
                            </li>
                        </ul>
                        <ul style="width: 19%;height: 100%;text-align: right;margin-left: 5%">
                            <li>螺栓头连接</li>
                        </ul>
                        <ul style="width: 20%;height: 100%;margin-left: 1%">
                            <li style="width: 100%;height: 100%">
                                <select v-model="form.bolt_type" style="boder:0.5px solid;border-color: #aaaaaa;border-radius: 0.5px ;width: 90%;height: 90%;margin-top: 1%">
                                    <option value="1">外六角螺栓</option>
                                    <option value="2">内六角螺栓</option>
                                </select>
                            </li>
                        </ul>
                    </div>
                    <div style="width: 100%;height: 30%;display: flex">
                        <ul class="bolt-left-contend-right-middle-ul">
                            <li></li>
                            <li>公称直径(mm)</li>
                            <li>支承面外径(mm)</li>
                            <li>小径(mm)</li>
                            <li>中径(mm)</li>
                            <li>支承面内径(mm)</li>
                        </ul>
                        <ul class="bolt-left-contend-right-middle-ul-2" style="text-align: center">
                            <li>螺栓/螺钉</li>
                            <li><input v-model="form.d"></li>
                            <li><input v-model="form.dw"></li>
                            <li><input v-model="form.d3"></li>
                            <li><input v-model="form.d2"></li>
                            <li><input v-model="form.da"></li>
                        </ul>
                        <ul class="bolt-left-contend-right-middle-ul-2">
                            <li>螺母/内螺纹</li>
                            <li style="width: 100%;hieght:100%;text-align: right;">
                                <span>
                                <button style="background-color: #D7D7D7;width: 25%;height: 98%;border-radius: 2px;margin-left: 5%" @click="showModal14">!</button>
                                <a-modal v-model="visible14" title="几何参数" @ok="handleOk14">
                                    <img style="width: 100%;height: 100%" src="../../../assets/image/image_45_02.png">
                                </a-modal>
                            </span>
                            </li>
                            <li><input v-model="form.s"></li>
                            <li><input v-model="form.D1"></li>
                            <li><input v-model="form.D2"></li>
                            <li>
                                <input v-model="form.Da">
                                <span>
                                <button style="background-color: #D7D7D7;width: 20%;height: 98%;border-radius: 2px;margin-left: 5%" @click="showModal15">!</button>
                                <a-modal v-model="visible15" title="几何参数" @ok="handleOk15">
                                    <img style="width: 100%;height: 100%" src="../../../assets/image/image_45_03.png">
                                </a-modal>
                            </span>
                            </li>
                        </ul>
                    </div>
                    <div style="width: 100%;height: 20%;display: flex">
                        <ul style="width: 55%;height: 100%;text-align: right">
                            <li style="width: 98%;height: 24.8%;margin-bottom: 0.2%">夹紧件是否承受轴向载荷</li>
                            <li style="width: 98%;height: 24.8%;margin-bottom: 0.2%">夹紧件是否承受扭矩载荷</li>
                            <li style="width: 98%;height: 24.8%;margin-bottom: 0.2%">传递载荷接触面数目</li>
                            <li style="width: 98%;height: 24.8%">损伤率计算点个数</li>
                        </ul>
                        <ul style="width: 40%;margin-left: 5%;height: 100%;">
                            <li style="width: 100%;height: 25%">
                                <select v-model="form.FA_action" style="width: 50%;height: 98%;">
                                    <option value="1">是</option>
                                    <option value="2">否</option>
                                </select>
                            </li>
                            <li style="width: 100%;height: 25%">
                                <select v-model="form.MY_action" style="width: 50%;height: 98%;text-align: center">
                                    <option value="1">是</option>
                                    <option value="2">否</option>
                                </select>
                            </li>
                            <li style="width: 100%;height: 25%"><input v-model="form.q" style="width: 50%;height: 98%;text-align: center"></li>
                            <li style="width: 100%;height: 25%"><input v-model="form.number_sigma" style="width: 50%;height: 98%;text-align: center"></li>
                        </ul>
                    </div>
                    <div style="width: 100%;height: 22.4%;margin-top: 0.1%;display: flex">
                        <ul style="width: 30%;height: 100%">
                            <li style="width: 100%;margin-top: 0.1%;height: 19.8%;text-align: center">螺杆段数</li>
                            <li style="width: 100%;margin-top: 0.1%;height: 19.8%;text-align: center">1</li>
                            <li style="width: 100%;margin-top: 0.1%;height: 19.8%;text-align: center">2</li>
                            <li style="width: 100%;margin-top: 0.1%;height: 19.8%;text-align: center">3</li>
                            <li style="width: 100%;margin-top: 0.1%;height: 19.8%;text-align: center">4</li>
                        </ul>
                        <ul style="width: 25%;height: 100%">
                            <li style="width: 100%;height: 19.8%;text-align: center">长度（mm）</li>
                            <li style="width: 100%;height: 19.8%;text-align: center"><input style="width: 60%;height: 100%;text-align: center" v-model="form.a102"></li>
                            <li style="width: 100%;height: 19.8%;text-align: center"><input style="width: 60%;height: 100%;text-align: center" v-model="form.a103"></li>
                            <li style="width: 100%;height: 19.8%;text-align: center"><input style="width: 60%;height: 100%;text-align: center" v-model="form.a104"></li>
                            <li style="width: 100%;height: 19.8%;text-align: center"><input style="width: 60%;height: 100%;text-align: center" v-model="form.a105"></li>
                        </ul>
                        <ul style="width: 25%;height: 100%;margin-left: 10%">
                            <li style="width: 100%;height: 19.8%;text-align: center">直径（mm）</li>
                            <li style="width: 100%;height: 19.8%;text-align: center"><input style="width: 60%;height: 100%;text-align: center" v-model="form.a106"></li>
                            <li style="width: 100%;height: 19.8%;text-align: center"><input style="width: 60%;height: 100%;text-align: center" v-model="form.a107"></li>
                            <li style="width: 100%;height: 19.8%;text-align: center"><input style="width: 60%;height: 100%;text-align: center" v-model="form.a108"></li>
                            <li style="width: 100%;height: 19.8%;text-align: center"><input style="width: 60%;height: 100%;text-align: center" v-model="form.a109"></li>
                        </ul>
                    </div>
                    <div style="width: 100%;height: 22.4%;margin-top: 0.1%;display: flex">
                        <ul style="width: 25%;height: 100%">
                            <li style="width: 100%;margin-top: 0.1%;height: 19.8%;text-align: center"></li>
                            <li style="width: 100%;margin-top: 0.1%;height: 19.8%;text-align: center">屈服强度(MPa)</li>
                            <li style="width: 100%;margin-top: 0.1%;height: 19.8%;text-align: center">抗拉强度(MPa)</li>
                            <li style="width: 100%;margin-top: 0.1%;height: 19.8%;text-align: center">剪切强度(MPa)</li>
                            <li style="width: 100%;margin-top: 0.1%;height: 19.8%;text-align: center">弹性模量(MPa)</li>
                        </ul>
                        <ul style="width: 25%;height: 100%;">
                            <li style="width: 100%;height: 19.8%;text-align: center">螺栓/螺钉</li>
                            <li style="width: 100%;height: 19.8%;text-align: center"><input style="width: 60%;height: 100%;text-align: center" v-model="form.Rp"></li>
                            <li style="width: 100%;height: 19.8%;text-align: center"><input style="width: 60%;height: 100%;text-align: center" v-model="form.RmS"></li>
                            <li style="width: 100%;height: 19.8%;text-align: center"><input style="width: 60%;height: 100%;text-align: center" v-model="form.tB"></li>
                            <li style="width: 100%;height: 19.8%;text-align: center"><input style="width: 60%;height: 100%;text-align: center" v-model="form.E_s"></li>
                        </ul>
                        <ul style="height: 100%;width: 10%">
                            <li style="width: 100%;height: 19.8%"></li>
                            <li style="width: 100%;height: 19.8%"></li>
                            <li style="width: 100%;height: 19.8%"></li>
                            <li style="width: 100%;height: 19.8%">
                                <button style="background-color: #D7D7D7;width: 98%;height: 98%;border-radius: 2px;margin-left: 5%" @click="showModal16">!</button>
                                <a-modal v-model="visible16" title="螺栓剪切强度比" @ok="handleOk16">
                                    <img style="width: 100%;height: 100%" src="../../../assets/image/image_45_07.png">
                                </a-modal>
                            </li>
                            <li style="width: 100%;height: 19.8%"></li>
                        </ul>
                        <ul style="width: 25%;height: 100%;">
                            <li style="width: 100%;height: 19.8%;text-align: center">螺母/内螺纹</li>
                            <li style="width: 100%;height: 19.8%;text-align: center"></li>
                            <li style="width: 100%;height: 19.8%;text-align: center"><input style="width: 60%;height: 100%;text-align: center" v-model="form.RmM"></li>
                            <li style="width: 100%;height: 19.8%;text-align: center"><input style="width: 60%;height: 100%;text-align: center" v-model="form.tBM"></li>
                            <li style="width: 100%;height: 19.8%;text-align: center"><input style="width: 60%;height: 100%;text-align: center" v-model="form.E_M"></li>
                        </ul>
                        <ul style="height: 100%;width: 10%;">
                            <li style="width: 100%;height: 19.8%"></li>
                            <li style="width: 100%;height: 19.8%"></li>
                            <li style="width: 100%;height: 19.8%"></li>
                            <li style="width: 100%;height: 19.8%">
                                <button style="background-color: #D7D7D7;width: 98%;height: 98%;border-radius: 2px;margin-left: 5%" @click="showModal16">!</button>
                                <a-modal v-model="visible16" title="螺栓剪切强度比" @ok="handleOk16">
                                    <img style="width: 100%;height: 100%" src="../../../assets/image/image_45_07.png">
                                </a-modal>
                            </li>
                            <li style="width: 100%;height: 19.8%"></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="bolt-right">
            <div class="bolt-right-top">
                <div class="bolt-right-top-title">载荷参数</div>
                <div class="bolt-right-top-contend">
                    <div class="bolt-right-top-contend-top">
                        <div style="width: 45%;height: 100%;display: flex">
                            <ul class="bolt-right-top-contend-top-ul-1">
                                <li>无效幅值过滤阈值(Mpa)</li>
                                <li>雨流载荷谱最大飞段数</li>
                                <li>雨流载荷谱最小分段数</li>
                            </ul>
                            <ul class="bolt-right-top-contend-top-ul-2">
                                <li><input v-model="form.threshold_amp" style="width: 60%;height: 60%;text-align: center"></li>
                                <li><input v-model="form.max_segment" style="width: 60%;height: 60%;text-align: center"></li>
                                <li><input v-model="form.min_segment" style="width: 60%;height: 60%;text-align: center"></li>
                            </ul>
                        </div>
                        <div style="width: 45%;height: 100%;display: flex;">
                            <ul class="bolt-right-top-contend-top-ul-1">
                                <li></li>
                                <li>雨流谱辐值间隔值（MPa）</li>
                                <li>雨流谱平均值间隔值（MPa）</li>
                            </ul>
                            <ul class="bolt-right-top-contend-top-ul-2">
                                <li></li>
                                <li><input v-model="form.space_amp_input" style="width: 60%;height: 60%;text-align: center"></li>
                                <li><input v-model="form.space_mean_input" style="width: 60%;height: 60%;text-align: center"></li>
                            </ul>
                        </div>
                    </div>
                    <div style="width: 100%;height: 10%;display: flex">
                        <div style="width: 80%;height: 99%;margin-left: 20%">
                            <a-upload :showUploadList="false" :maxCount="1" :customRequest="customRequest" name="file">
                                <button style="background-color: #6dd400;
                                border-radius: 4px;
                                border: 2px #686868;">输入载荷通道系数矩阵</button>
                            </a-upload>
                                <button style="margin-left: 80px;height:60%;
                                background-color: #6dd400;
                                border-radius: 4px;
                                border: 2px #686868;" @click="clear()">
                                    清除载荷通道系数矩</button>
                        </div>
                    </div>
                  <p>注：载荷通道系数矩阵文件格式为.xls或.xlsx，其各列参数如下表所示(无需表头)</p>
                    <div class="bolt-right-top-contend-middle" style="overflow-y: scroll">
                        <table>
                            <tr style="width: 100%;height: 18%;text-align: center;background-color: #EAEAEA">
                                <th style="width: 10%;height: 100%;">样本载荷(单位与载荷文件单位相同)</th>
                                <th style="width: 10%;height: 100%;">样本载荷是螺杆承受轴向载荷(N)</th>
                                <th style="width: 10%;height: 100%">样本载荷时螺杆承受X向弯矩(Nmm)</th>
                                <th style="width: 10%;height: 100%">样本载荷时螺杆承受Y向弯矩(Nmm)</th>
                                <th style="width: 10%;height: 100%">样本载荷在载荷文件中所处列数</th>
                            </tr>
                            <tr style="text-align: center;" v-for="(item,index) in coefficient_matrix" :key="index">
                                <td>{{item[0]}}</td>
                                <td>{{item[1]}}</td>
                                <td>{{item[2]}}</td>
                                <td>{{item[3]}}</td>
                                <td>{{item[4]}}</td>
                            </tr>
                        </table>
                    </div>
                    <div style="width: 99.5%;height: 12%;margin-left: 0.5%">
<!--                        注意：载荷需放入当前目录\Boltfatigue\load中，载荷文件类型为XLS或TXT；-->
<!--                        频次文件需放入当前目录\Boltfatigue\frequency中，文件类型只能为XLS，第一列为载荷名，第二列为频次；-->
<!--                        螺杆各计算点的应力雨流载荷谱写入当前目录\Boltfatigue\boltRFCstress中。-->
<!--                        需要上传的载荷谱文件名为coeff_matrix.xls，格式如上表。-->
                    </div>
                </div>
            </div>
            <div class="bolt-right-bottom">
                <div class="bolt-right-bottom-title">结果输出</div>
                <div style="width: 100%;height: 100%;display: flex">
                    <div style="width: 80%;height: 90%;display: flex">
                        <ul style="width: 29%;height: 100%">
                            <li style="height: 12%;width: 100%;text-align: right;">实际装配最大预紧力(N)</li>
                            <li style="height: 12%;width: 100%;text-align: right;">实际装配最小预紧力(N)</li>
                            <li style="height: 12%;width: 100%;text-align: right;">利用系数</li>
                            <li style="height: 12%;width: 100%;text-align: right;">预紧力改变量(N)</li>
                            <li style="height: 12%;width: 100%;text-align: right;">工作状态最大预紧力(N)</li>
                            <li style="height: 12%;width: 100%;text-align: right;">工作状态最小预紧力(N)</li>
                            <li style="height: 12%;width: 100%;text-align: right;">工作屈服安全系数</li>
                            <li style="height: 12%;width: 100%;text-align: right;">疲劳安全系数</li>
                        </ul>
                        <ul style="height: 100%;width: 20%;margin-left: 1%">
                            <li style="height: 12%;width: 100%;text-align: center;">{{ans.FM_zul}}</li>
                            <li style="height: 12%;width: 100%;text-align: center;">{{ans.FM_zul_min}}</li>
                            <li style="height: 12%;width: 100%;text-align: center;">{{ans.v_zul}}</li>
                            <li style="height: 12%;width: 100%;text-align: center;">{{ans.FZ}}</li>
                            <li style="height: 12%;width: 100%;text-align: center;">{{ans.FM_work}}</li>
                            <li style="height: 12%;width: 100%;text-align: center;">{{ans.FM_work_min}}</li>
                            <li style="height: 12%;width: 100%;text-align: center;">{{ans.SF}}</li>
                            <li style="height: 12%;width: 100%;text-align: center;">{{ans.SD}}</li>
                        </ul>
                        <ul style="width: 29%;height: 100%">
                            <li style="height: 12%;width: 100%;text-align: right;">装配压应力安全系数</li>
                            <li style="height: 12%;width: 100%;text-align: right;">工作压应力安全系数</li>
                            <li style="height: 12%;width: 100%;text-align: right;">最小结合螺纹长度(mm)</li>
                            <li style="height: 12%;width: 100%;text-align: right;">变形锥最大外径(mm)</li>
                            <li style="height: 12%;width: 100%;text-align: right;">结合面极限尺寸(mm)</li>
                            <li style="height: 12%;width: 100%;text-align: right;">螺杆轴向柔度(mm/N)</li>
                            <li style="height: 12%;width: 100%;text-align: right;">夹紧件轴向柔度(mm/N)</li>
                            <li style="height: 12%;width: 100%;text-align: right;">损伤率最大处角度(°)</li>
                        </ul>
                        <ul style="height: 100%;width: 20%;margin-left: 1%">
                            <li style="height: 12%;width: 100%;text-align: center">{{ans.Sp_M}}</li>
                            <li style="height: 12%;width: 100%;text-align: center">{{ans.Sp_B}}</li>
                            <li style="height: 12%;width: 100%;text-align: center">{{ans.meff_min}}</li>
                            <li style="height: 12%;width: 100%;text-align: center">{{ans.D_AGr}}</li>
                            <li style="height: 12%;width: 100%;text-align: center">{{ans.G}}</li>
                            <li style="height: 12%;width: 100%;text-align: center">{{ans.delta_s}}</li>
                            <li style="height: 12%;width: 100%;text-align: center">{{ans.delta_P}}</li>
                            <li style="height: 12%;width: 100%;text-align: center">{{ans.damage_max_angle}}</li>
                        </ul>
                    </div>
                    <div style="width: 20%;height: 30%;margin-top: 25%">
                        <button @click="tclick" style="width: 80%;height: 40%;margin-left: 5%;border-radius: 4px;border: 2px #686868; background-color: #6dd400;">计算</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
import {filetext, firedelete, multi_bolt} from "@/api/file";

    export default {
        created() {
            document.title = '多自由度螺栓强度校核'
            this.$store.state.file.key=45
        },
        name: "multi_bolt",
        data(){
            return{
              form2:{
                uuids:[]
              },
                form:this.$store.state.file.dataList[45],
                coefficient_matrix:[[]],
                visible10:false,
                visible11:false,
                visible12:false,
                visible13:false,
                visible14:false,
                visible15:false,
                visible16:false,
                visible17:false,
                params_bolt:{
                    type1:1,
                },
                ans:{
                    FM_zul:"static text",
                    FM_zul_min:"static text",
                    v_zul:"static text",
                    FZ:"static text",
                    FM_work:"static text",
                    FM_work_min:"static text",
                    SF:"static text",
                    SD:"static text",
                    Sp_M:"static text",
                    Sp_B:"static text",
                    meff_min:"static text",
                    D_AGr:"static text",
                    delta_s:"static text",
                    delta_P:"static text",
                    damage_max_angle:"static text",
                    G:"static text",
                },
            };
        },
      mounted(){
        //绑定页面退出事件
        window.onbeforeunload= (e)=>{
          e = e || window.event;
          if (e) {
            e.returnValue = '关闭提示';
          }
          this.delete()//调用自己的方法
          // Chrome, Safari, Firefox 4+, Opera 12+ , IE 9+
          return '关闭提示';
        };
      },
        methods:{
          //同步请求删除载荷谱数组的方法
          async delete(){
            this.form2.uuids=this.form2.uuids.toString();//将载荷谱文件数组转成字符串
            await firedelete(this.form2).then(res => {
              console.log(res);
            })
          },
            customRequest(data)
            {
                const formData = new FormData()
                formData.append('fileName', data.file)
                filetext(formData)
                    .then(res => {//这里需要用箭头函数，如果不用箭头函数里面的this就不是外面那个this
                        console.log(res)
                        this.coefficient_matrix=res.data.filedata;
                        this.form.uuid=res.data.uuid;
                      this.form2.uuids.push(res.data.uuid);
                    })
                    .catch(error => {
                        console.log(error);
                    });
            },
           clear(){
            this.coefficient_matrix=[[]]
           },
            tclick()
            {
                this.form.coefficient_matrix=this.coefficient_matrix.toString();
                if(this.form.uuid=="")
                  this.$message.warning("请先导入载荷通道系数矩阵")
                else {
                  multi_bolt(this.form)
                      .then(res => {
                        console.log("打印结果");
                        console.log("res");
                        this.ans.FM_zul = res[0];
                        this.ans.FM_zul_min = res[1];
                        this.ans.v_zul = res[2];
                        this.ans.FZ = res[3];
                        this.ans.FM_work = res[4];
                        this.ans.FM_work_min = res[5];
                        this.ans.SF = res[6];
                        this.ans.SD = res[7];
                        this.ans.Sp_M = res[8];
                        this.ans.Sp_B = res[9];
                        this.ans.meff_min = res[10];
                        this.ans.D_AGr = res[11];
                        this.ans.delta_s = res[12];
                        this.ans.delta_P = res[13];
                        this.ans.damage_max_angle = res[14];
                        this.ans.G = res[15];
                      })
                      .catch(err => {
                        this.$message.error(err);
                      });
                }
            },

            showModal10(){
                this.visible10=true;
            },
            showModal11(){
                this.visible11=true;
            },
            showModal12(){
                this.visible12=true;
            },
            showModal13(){
                this.visible13=true;
            },
            showModal14(){
                this.visible14=true;
            },
            showModal15(){
                this.visible15=true;
            },
            showModal16(){
                this.visible16=true;
            },
            showModal17(){
                this.visible17=true;
            },
            handleOk10(){
                this.visible10 = false;
            },
            handleOk11(){
                this.visible11 = false;
            },
            handleOk12(){
                this.visible12 = false;
            },
            handleOk13(){
                this.visible13 = false;
            },
            handleOk14(){
                this.visible14 = false;
            },
            handleOk15(){
                this.visible15 = false;
            },
            handleOk16(){
                this.visible16 = false;
            },

        },
    }
</script>

<style scoped>
    .bolt-all{
        width: 100%;
        height: 100%;
        /*background-color: #686868;*/
        display: flex;
        overflow-x: auto;
        overflow-y: auto;
    }
    .bolt-left{
        width: 55%;
        height: 99%;
        margin-top: 0.5%;
        box-shadow: 1.5px 1.5px 2px #aaaaaa;
        border: 0.5px solid rgba(231, 231, 231, 0.486);
        border-radius: 3px;
        /*background-color: #42b983;*/
        margin-left: 0.5%;
    }
    .bolt-left-title{
        height: 4%;
        width: 100%;
        font-size: 17.5px;
        background-color: #D7D7D7;
        border-radius: 3px;
        padding-left: 3%;
        font-weight: bolder;
    }
    .bolt-left-contend{
        width: 100%;
        height: 94%;
        margin-top: 0.5%;
        /*background-color: #686868;*/
        display: flex;
    }
    .bolt-left-contend-left{
        width: 45%;
        height: 100%;
        display: flex;
    }
    .bolt-left-contend-left-ul{
        width: 49%;
        height: 100%;
    }
    .bolt-left-contend-left-ul li{
        width: 100%;
        height: 4%;
        /*background-color: steelblue;*/
        text-align: right;
        margin-top: 0.1%;
    }
    .bolt-left-contend-left-ul-1{
        width: 50%;
        height: 100%;
        margin-left: 1%;
    }
    .bolt-left-contend-left-ul-1 li{
        width: 100%;
        height: 4%;
        /*background-color: steelblue;*/
        /*text-align: ;*/
        margin-top: 0.1%;
    }
    .bolt-left-contend-left-ul-1 input{
        width: 50%;
        height: 98%;
        margin-top: 1%;
        text-align: center;
    }
    .bolt-left-contend-right{
        width: 54%;
        margin-left: 0.5%;
        /*background-color: darkslateblue;*/
    }
    .bolt-left-contend-right-middle-ul{
        height: 100%;
        width: 30%;
        /*background-color: #6DD400;*/
    }
    .bolt-left-contend-right-middle-ul li{
        height: 16%;
        width: 100%;
        /*background-color: red;*/
        margin-top: 0.2%;
        text-align: right;
    }
    .bolt-left-contend-right-middle-ul-2{
        height: 100%;
        width: 35%;
        margin-left: 1%;
    }
    .bolt-left-contend-right-middle-ul-2 li{
        height: 16%;
        width: 100%;
        /*background-color: red;*/
        margin-top: 0.2%;
    }
    .bolt-left-contend-right-middle-ul-2 input{
        text-align: center;
        width: 60%;
        height: 98%;
    }
    .bolt-right{
        width: 44.5%;
        margin-left: 0.5%;
        height: 99%;
        margin-top: 0.5%;
        box-shadow: 1.5px 1.5px 2px #aaaaaa;
        border: 0.5px solid rgba(231, 231, 231, 0.486);
        border-radius: 3px;
        /*background-color: #6DD400;*/
    }
    .bolt-right-top{
        width: 99%;
        height: 59.5%;
    }
    .bolt-right-top-title{
        width: 100%;
        height: 8%;
        font-size: 17.5px;
        background-color: #D7D7D7;
        border-radius: 3px;
        padding-left: 3%;
        font-weight: bolder;
    }
    .bolt-right-top-contend{
        width: 100%;
        height: 91.5%;
        margin-top: 0.5%;
    }
    .bolt-right-top-contend-top{
        height: 30%;
        width: 100%;
        display: flex;
    }
    .bolt-right-top-contend-top-ul-1{
        width: 58%;
        height: 100%;
    }
    .bolt-right-top-contend-top-ul-2{
        width: 40%;
        height: 100%;
        margin-left: 2%;
    }
    .bolt-right-top-contend-top-ul-1 li{
        width: 100%;
        height: 33.3%;
        margin-top: 0.2%;
        text-align: right;
    }
    .bolt-right-top-contend-top-ul-2 li{
        width: 100%;
        height: 33.3%;
        margin-top: 0.2%;
    }
    .bolt-right-top-contend-middle{
        width: 100%;
        height: 43%;
        margin-left: 0.5%;
        margin-top: 0.2%;
        border: 0.5px solid rgba(231, 231, 231, 0.486);
    }


    .bolt-right-bottom{
        width: 99%;
        margin-left: 0.5%;
        height: 39.5%;
        margin-top: 0.5%;
        border:1px solid;
        border-radius: 2px;
        border: 0.5px solid rgba(231, 231, 231, 0.486);
    }
    .bolt-right-bottom-title{
        height: 10%;
        width: 100%;
        font-size: 17.5px;
        background-color: #D7D7D7;
        border-radius: 3px;
        padding-left: 3%;
        font-weight: bolder;
    }
    table tr:nth-child(even)
    {
        background: whitesmoke;
    }
</style>